<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="outer">
        outer
        <div id="middle">
            middle
            <div id="inner">
                inner
            </div>
        </div>
    </div>
</body>
</html>
<script>
    document.getElementById("outer").addEventListener('click',() => {
        console.log('outer clicked');
    })

    document.getElementById("middle").addEventListener('click',() => {
        console.log('middle clicked');
    })

    document.getElementById('inner').addEventListener('click',() => {
        console.log('inner clicked');
    })
</script>